package ArvVsKompositionB;

import java.util.List;

public class Main {
	public static void main(String[] args) {
		Person testPerson = new Person();
		testPerson.setName("Simon");
		
		InstructorRole role1 = new InstructorRole();
		role1.setType("Instructor");
		role1.addCourse("Java for beginners");
		role1.addCourse("NullPointerExceptions and how to fix them");
		
		ConsultantRole role2 = new ConsultantRole();
		role2.setType("Consultant");
		role2.setCompetence(10);
		
		testPerson.addRole(role1);
		testPerson.addRole(role2);
		
		List<Role> test = testPerson.getChildren();
		System.out.println(testPerson.getName());
		for (Role roles : test) {
			System.out.println("Role: " + roles.getType());
			roles.printDetails();
		}
	}
}
